/**
 * Copyright © 2020 易久批信息技术有限公司. All rights reserved.
 */
package com.dysm.builder;

/**
 *
 * @author xiay
 * @since 2020/12/5 9:47 下午
 */
public class MyDogDirector implements DogDirector {

    private DogBuilder builder;

    public MyDogDirector(DogBuilder builder) {
        this.builder = builder;
    }

    @Override
    public Dog createDog() {
        Dog dog = new Dog();
        dog.setHeader(builder.createHeader());
        dog.setLeg(builder.createLeg());
        dog.setTail(builder.createTail());
        return dog;
    }
}
